
public class ServiceA extends AbstractService {

    public ServiceA(AbstractMediator mediator) {
        super(mediator);
    }

    public void doSomething() {
        System.out.println("I'm Service A");
    }

    public void callB() {
        this.doSomething();
        System.out.println("调用Service B");
        mediator.callServiceB();
    }
}